home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tex / amstex.tex < prev    next >
Text File  |  1985-06-03  |  31KB  |  890 lines

  1. % AMS-TEX VERSION 0.999999 - FOR USE WITH TEX VERSION  1.0
  2. % COPYRIGHT (C) 1983 BY AMERICAN MATHEMATICAL SOCIETY
  3.  
  4.  
  5. % NOTE 1, NOTE 2, ... REFER TO NOTES IN THE FILE AMSTEX.DOC
  6.  
  7.  
  8. % SPECIAL CATCODES
  9.  
  10. \catcode`\@=13                                                         % NOTE 1
  11. \def@{\errmessage{AmS-TeX error: \string@ has no current use
  12.      (use \string\@\space for printed \string@ symbol)}}
  13. \catcode`\@=11                                                         % NOTE 2
  14. \def\@{\char'100 }
  15. \catcode`\~=13                                                         % NOTE 3
  16.  
  17.  
  18. % AMSTEX ERROR MESSAGES
  19.  
  20. \def\err@AmS#1{\errmessage{AmS-TeX error: #1}}                         % NOTE 4
  21.  
  22.  
  23. % SOME BASIC CONTROL SEQUENCES USED IN OTHER DEFINITIONS
  24.  
  25. \def\eat@AmS#1{}
  26.  
  27. \long\def\comp@AmS#1#2{\def\@AmS{#1}\def\@@AmS{#2}\ifx
  28.    \@AmS\@@AmS\def\cresult@AmS{T}\else\def\cresult@AmS{F}\fi}          % NOTE 5
  29.  
  30. \def\in@AmS#1#2{\def\intest@AmS##1#1##2{\comp@AmS##2\end@AmS\if T\cresult@AmS
  31.    \def\cresult@AmS{F}\def\in@@AmS{}\else
  32.    \def\cresult@AmS{T}\def\in@@AmS####1\end@AmS{}\fi\in@@AmS}%
  33.    \def\cresult@AmS{F}\intest@AmS#2#1\end@AmS}                         % NOTE 6
  34.  
  35.  
  36. % BASIC MECHANICSMS TO ALLOW USER TO MAKE DEFINITIONS
  37.  
  38. \let\relax@AmS=\relax                                                  % NOTE 7
  39.  
  40. % CHANGES IN plain WHERE THERE IS \relax, THAT MUST NOW BE \relax@AmS
  41.  
  42. \def\magstep#1{\ifcase#1 \@m\or 1200\or 1440\or 1728\or 2074\or 2488\fi
  43.      \relax@AmS}
  44.  
  45. \def\iterate{\body\let\next\iterate \else\let\next\relax@AmS\fi \next}
  46.  
  47. \def\enskip{\hskip.5em\relax@AmS}
  48.  
  49. \def\strut{\relax@AmS\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
  50.  
  51. \let\+=\relax@AmS
  52. \def\sett@b{\ifx\next\+\let\next\relax@AmS
  53.     \def\next{\afterassignment\s@tt@b\let\next}%
  54.   \else\let\next\s@tcols\fi\next}
  55. \def\s@tt@b{\let\next\relax@AmS\us@false\m@ketabbox}
  56.  
  57. \def\smash{\relax@AmS % \relax@AmS, in case this comes first in \halign
  58.   \ifmmode\def\next{\mathpalette\mathsm@sh}\else\let\next\makesm@sh
  59.   \fi\next}
  60.  
  61. % (END OF CHANGES TO plain)
  62.  
  63. \def\define#1{\expandafter\ifx\csname\expandafter\eat@AmS\string#1\endcsname
  64.    \relax@AmS\def\dresult@AmS{\def#1}\else
  65.    \err@AmS{\string#1\space is already defined}\def
  66.       \dresult@AmS{\def\garbage@AmS}\fi\dresult@AmS}                   % NOTE 8
  67.  
  68. \let\redefine=\def
  69.  
  70. \def\predefine#1#2{\let#1=#2}
  71.  
  72.  
  73. % MACROS FOR DEFICIENT KEYBOARDS
  74.  
  75. \chardef\plus=`+
  76. \chardef\equal=`=
  77. \chardef\less=`<
  78. \chardef\more=`>
  79.  
  80.  
  81. % MACROS FOR HANDLING TEXT
  82.  
  83. \let\ic@AmS=\/
  84. \def\/{\unskip\ic@AmS}
  85.  
  86. \def\Space@AmS.{\futurelet\Space@AmS\relax@AmS}
  87. \Space@AmS. %                                             % NOTE 10 (no NOTE 9)
  88.  
  89. \def~{\unskip\futurelet\tok@AmS\s@AmS}
  90. \def\s@AmS{\ifx\tok@AmS\Space@AmS\def\next@AmS{}\else
  91.         \def\next@AmS{\ }\fi\penalty 9999 \next@AmS}                  % NOTE 11
  92.  
  93. \def\period{\unskip.\spacefactor3000 { }}
  94.  
  95.  
  96. \def\srdr@AmS{\thinspace}                                             % NOTE 12
  97. \def\drsr@AmS{\kern .02778em }
  98. \def\sldl@AmS{\kern .02778em}
  99. \def\dlsl@AmS{\thinspace}
  100.  
  101. \def\lqtest@AmS#1{\comp@AmS{#1}`\if T\cresult@AmS\else\comp@AmS{#1}\lq\fi}
  102.  
  103.                                                                       % NOTE 13
  104.  
  105. \def\qspace#1{\unskip
  106.   \lqtest@AmS{#1}\let\fresult@AmS=\cresult@AmS\if T\cresult@AmS
  107.      \def\qspace@AmS{\ifx\tok@AmS\Space@AmS\def\next@AmS{\dlsl@AmS`}\else
  108.        \def\next@AmS{\qspace@@AmS}\fi\next@AmS}\else
  109.      \def\qspace@AmS{\ifx\tok@AmS\Space@AmS\def\next@AmS{\drsr@AmS'}\else
  110.        \def\next@AmS{\qspace@@AmS}\fi\next@AmS}\fi
  111.     \futurelet\tok@AmS\qspace@AmS}                                    % NOTE 14
  112.  
  113. \def\qspace@@AmS{\futurelet\tok@AmS\qspace@@@AmS}
  114.  
  115. \def\qspace@@@AmS{\if T\fresult@AmS  \ifx\tok@AmS`\sldl@AmS`\else
  116.        \ifx\tok@AmS\lq\sldl@AmS`\else \dlsl@AmS`\fi \fi
  117.                          \else  \ifx\tok@AmS'\srdr@AmS'\else
  118.         \ifx\tok@AmS\rq\srdr@AmS'\else \drsr@AmS'\fi \fi
  119.         \fi}
  120.  
  121.  
  122.  
  123. \def\dash{\unskip\penalty0---}
  124. \def\slash{\unskip/\penalty\exhyphenpenalty}
  125.  
  126. \def\{{\relax@AmS\ifmmode\delimiter"4266308 \else
  127.     $\delimiter"4266308 $\fi}                            % NOTE 16 (No NOTE 15)
  128.  
  129. \def\}{\relax@AmS\ifmmode\delimiter"5267309 \else$\delimiter"5267309 $\fi}
  130.  
  131.  
  132. \def\AmSTeX{$\cal A$\kern-.1667em\lower.5ex\hbox{$\cal M$}\kern-.125em
  133.      $\cal S$-\TeX}
  134.  
  135. \def\smallvspace{\vskip\smallskipamount}                            % NOTE 17
  136. \def\medvspace{\vskip\medskipamount}
  137. \def\bigvspace{\vskip\bigskipamount}
  138.  
  139.  
  140. \def\linebreak{\unskip\penalty-10000 }                                % NOTE 18
  141. \def\pagebreak{\vadjust{\penalty-10000 }}
  142. \def\newpage{\par\vfill\eject}
  143.  
  144. \def\newline{\ifvmode \err@AmS{There's no line here to break}\else
  145.      \hfil\penalty-10000\fi}
  146.  
  147. \def\topspace#1{\insert\topins{\penalty100 \splittopskip=0pt
  148.      \vbox to #1{}}}
  149. \def\midspace#1{\setbox0=\vbox to #1{}\advance\dimen0 by \pagetotal
  150.   \ifdim\dimen0>\pagegoal\topspace{#1}\else\vadjust{\box0}\fi}
  151.  
  152. \long\def\comment{\begingroup
  153.  \catcode`\{=12 \catcode`\}=12 \catcode`\#= 12 \catcode`\^^M=12
  154.    \catcode`\%=12 \catcode`^^A=14
  155.     \comment@AmS}
  156. \begingroup\catcode`^^A=14
  157. \catcode`\^^M=12  ^^A
  158. \long\gdef\comment@AmS#1^^M#2{\comp@AmS\endcomment{#2}\if T\cresult@AmS^^A
  159. \def\comment@@AmS{\endgroup}\else^^A
  160.  \long\def\comment@@AmS{\comment@AmS#2}\fi\comment@@AmS}\endgroup     % NOTE 19
  161.  
  162.  
  163. % STYLE, SPACING AND ALTERNATE NAMES
  164.  
  165. \let\dsize=\displaystyle
  166. \let\tsize=\textstyle
  167. \let\ssize=\scriptstyle
  168. \let\sssize=\scriptscriptstyle
  169.  
  170. \def\text#1{\hbox{\rm#1}}
  171.  
  172. \def\quad{\relax@AmS\ifmmode
  173.     \hbox{\hskip1em}\else\hskip1em\relax@AmS\fi}                      % NOTE 20
  174. \def\qquad{\quad\quad}
  175. \def\,{\relax@AmS\ifmmode\mskip\thinmuskip\else$\mskip\thinmuskip$\fi}
  176. \def\;{\relax@AmS
  177.   \ifmmode\mskip\thickmuskip\else$\mskip\thickmuskip$\fi}
  178.  
  179.  
  180. \def\stack#1#2{{#1\atop #2}}
  181.  
  182. \def\frac#1#2{{#1\over#2}}
  183. \def\Frac#1#2{{\displaystyle{#1\over#2}}}
  184.  
  185. \def\thickfrac#1#2{{#1\above1pt #2}}
  186.  
  187. \def\binom#1#2{{#1\choose #2}}
  188. \def\Binom#1#2{{\displaystyle{#1\choose #2}}}
  189.  
  190.  
  191. \mathchardef\:="603A                                                  % NOTE 21
  192.  
  193.  
  194. % BIG DELIMITERS
  195.  
  196. \def\big@AmS#1{{\hbox{$\left#1\vbox to\big@@AmS{}\right.\offspace@AmS$}}}
  197. \def\Big@AmS#1{{\hbox{$\left#1\vbox to\Big@@AmS{}\right.\offspace@AmS$}}}
  198. \def\bigg@AmS#1{{\hbox{$\left#1\vbox to\bigg@@AmS{}\right.\offspace@AmS$}}}
  199. \def\Bigg@AmS#1{{\hbox{$\left#1\vbox to\Bigg@@AmS{}\right.\offspace@AmS$}}}
  200. \def\offspace@AmS{\nulldelimiterspace0pt \mathsurround0pt }
  201.  
  202. \def\big@@AmS{8.5pt}                                % NOTE 24 (no NOTES 22, 23)
  203. \def\Big@@AmS{11.5pt}
  204. \def\bigg@@AmS{14.5pt}
  205. \def\Bigg@@AmS{17.5pt}
  206.  
  207. \def\bigl{\mathopen\big@AmS}
  208. \def\bigm{\mathrel\big@AmS}
  209. \def\bigr{\mathclose\big@AmS}
  210. \def\Bigl{\mathopen\Big@AmS}
  211. \def\Bigm{\mathrel\Big@AmS}
  212. \def\Bigr{\mathclose\Big@AmS}
  213. \def\biggl{\mathopen\bigg@AmS}
  214. \def\biggm{\mathrel\bigg@AMS}
  215. \def\biggr{\mathclose\bigg@AmS}
  216. \def\Biggl{\mathopen\Bigg@AmS}
  217. \def\Biggm{\mathrel\Bigg@AmS}
  218. \def\Biggr{\mathclose\Bigg@AmS}
  219.  
  220.  
  221. %  MAKING ' WORK FOR PRIMES
  222.  
  223. {\catcode`'=13 \gdef'{^\bgroup\prime\prime@AmS}}
  224. \def\prime@AmS{\futurelet\tok@AmS\prime@@AmS}
  225. \def\prime@@@AmS#1{\futurelet\tok@AmS\prime@@AmS}
  226. \def\prime@@AmS{\ifx\tok@AmS'\def\next@AmS{\prime\prime@@@AmS}\else
  227.    \def\next@AmS{\egroup}\fi\next@AmS}
  228.  
  229.  
  230. %  SMASHES                                                            % NOTE 25
  231.  
  232. \def\topsmash{\relax@AmS\ifmmode\def\topsmash@AmS
  233.    {\mathpalette\mathtopsmash@AmS}\else
  234.     \let\topsmash@AmS=\maketopsmash@AmS\fi\topsmash@AmS}
  235.  
  236. \def\maketopsmash@AmS#1{\setbox0=\hbox{#1}\topsmash@@AmS}
  237.  
  238. \def\mathtopsmash@AmS#1#2{\setbox0=\hbox{$#1{#2}$}\topsmash@@AmS}
  239.  
  240. \def\topsmash@@AmS{\vbox to 0pt{\kern-\ht0\box0}}
  241.  
  242.  
  243. \def\botsmash{\relax@AmS\ifmmode\def\botsmash@AmS
  244.    {\mathpalette\mathbotsmash@AmS}\else
  245.      \let\botsmash@AmS=\makebotsmash@AmS\fi\botsmash@AmS}
  246.  
  247. \def\makebotsmash@AmS#1{\setbox0=\hbox{#1}\botsmash@@AmS}
  248.  
  249. \def\mathbotsmash@AmS#1#2{\setbox0=\hbox{$#1{#2}$}\botsmash@@AmS}
  250.  
  251. \def\botsmash@@AmS{\vbox to \ht0{\box0\vss}}
  252.  
  253.  
  254.  
  255. %  LARGE OPERATORS
  256.  
  257. \def\LimitsOnSums{\let\slimits@AmS=\displaylimits}                    % NOTE 26
  258. \def\NoLimitsOnSums{\let\slimits@AmS=\nolimits}
  259.  
  260. \LimitsOnSums
  261.  
  262. \mathchardef\coprod@AmS"1360       \def\coprod{\coprod@AmS\slimits@AmS}
  263. \mathchardef\bigvee@AmS"1357       \def\bigvee{\bigvee@AmS\slimits@AmS}
  264. \mathchardef\bigwedge@AmS"1356     \def\bigwedge{\bigwedge@AmS\slimits@AmS}
  265. \mathchardef\biguplus@AmS"1355     \def\biguplus{\biguplus@AmS\slimits@AmS}
  266. \mathchardef\bigcap@AmS"1354       \def\bigcap{\bigcap@AmS\slimits@AmS}
  267. \mathchardef\bigcup@AmS"1353       \def\bigcup{\bigcup@AmS\slimits@AmS}
  268. \mathchardef\prod@AmS"1351         \def\prod{\prod@AmS\slimits@AmS}
  269. \mathchardef\sum@AmS"1350          \def\sum{\sum@AmS\slimits@AmS}
  270. \mathchardef\bigotimes@AmS"134E    \def\bigotimes{\bigotimes@AmS\slimits@AmS}
  271. \mathchardef\bigoplus@AmS"134C     \def\bigoplus{\bigoplus@AmS\slimits@AmS}
  272. \mathchardef\bigodot@AmS"134A      \def\bigodot{\bigodot@AmS\slimits@AmS}
  273. \mathchardef\bigsqcup@AmS"1346     \def\bigsqcup{\bigsqcup@AmS\slimits@AmS}
  274.  
  275.  
  276. \def\LimitsOnInts{\let\ilimits@AmS=\displaylimits}
  277. \def\NoLimitsOnInts{\let\ilimits@AmS=\nolimits}
  278.  
  279. \NoLimitsOnInts
  280.  
  281. \mathchardef\int@AmS"1352
  282. \def\int{\gdef\intflag@AmS{T}\int@AmS\ilimits@AmS}                    % NOTE 27
  283.  
  284. \mathchardef\oint@AmS"1348 \def\oint{\gdef\intflag@AmS{T}\oint@AmS\ilimits@AmS}
  285.  
  286. \def\inttest@AmS#1{\def\intflag@AmS{F}\setbox0=\hbox{$#1$}}
  287.  
  288.  
  289. \def\intic@AmS{\mathchoice{\hbox{\hskip5pt}}{\hbox
  290.           {\hskip4pt}}{\hbox{\hskip4pt}}{\hbox{\hskip4pt}}}           % NOTE 28
  291. \def\negintic@AmS{\mathchoice
  292.   {\hbox{\hskip-5pt}}{\hbox{\hskip-4pt}}{\hbox{\hskip-4pt}}{\hbox{\hskip-4pt}}}
  293. \def\intkern@AmS{\mathchoice{\!\!\!}{\!\!}{\!\!}{\!\!}}
  294. \def\intdots@AmS{\mathchoice{\cdots}{{\cdotp}\mkern 1.5mu
  295.     {\cdotp}\mkern 1.5mu{\cdotp}}{{\cdotp}\mkern 1mu{\cdotp}\mkern 1mu
  296.       {\cdotp}}{{\cdotp}\mkern 1mu{\cdotp}\mkern 1mu{\cdotp}}}
  297.  
  298. \newcount\intno@AmS                                                   % NOTE 29
  299.  
  300. \def\intii{\gdef\intflag@AmS{T}\intno@AmS=2\futurelet                 % NOTE 30
  301.               \tok@AmS\ints@AmS}
  302. \def\intiii{\gdef\intflag@AmS{T}\intno@AmS=3\futurelet\tok@AmS\ints@AmS}
  303. \def\intiv{\gdef\intflag@AmS{T}\intno@AmS=4\futurelet\tok@AmS\ints@AmS}
  304. \def\intdotsint{\gdef\intflag@AmS{T}\intno@AmS=0\futurelet
  305.     \tok@AmS\ints@AmS}
  306.  
  307. \def\ints@AmS{\findlimits@AmS\ints@@AmS}
  308.  
  309. \def\findlimits@AmS{\def\ignoretoken@AmS{T}\ifx\tok@AmS\limits
  310.    \def\limits@AmS{T}\else\ifx\tok@AmS\nolimits\def\limits@AmS{F}\else
  311.      \def\ignoretoken@AmS{F}\ifx\ilimits@AmS\nolimits\def\limits@AmS{F}\else
  312.        \def\limits@AmS{T}\fi\fi\fi}
  313.  
  314. \def\multintlimits@AmS{\int@AmS\ifnum \intno@AmS=0\intdots@AmS
  315.   \else \intkern@AmS\fi
  316.     \ifnum\intno@AmS>2\int@AmS\intkern@AmS\fi
  317.      \ifnum\intno@AmS>3 \int@AmS\intkern@AmS\fi \int@AmS}
  318.  
  319. \def\multint@AmS{\int\ifnum \intno@AmS=0\intdots@AmS\else\intkern@AmS\fi
  320.    \ifnum\intno@AmS>2\int\intkern@AmS\fi
  321.     \ifnum\intno@AmS>3 \int\intkern@AmS\fi \int}
  322.  
  323. \def\ints@@AmS{\if F\ignoretoken@AmS\def\ints@@@AmS{\if
  324.     T\limits@AmS\negintic@AmS
  325.  \mathop{\intic@AmS\multintlimits@AmS}\limits\else
  326.     \multint@AmS\nolimits\fi}\else\def\ints@@@AmS{\if T\limits@AmS
  327.    \negintic@AmS\mathop{\intic@AmS\multintlimits@AmS}\limits\else
  328.     \multint@AmS\nolimits\fi\eat@AmS}\fi\ints@@@AmS}
  329.  
  330.  
  331.  
  332. \def\LimitsOnNames{\let\nlimits@AmS=\displaylimits}
  333. \def\NoLimitsOnNames{\let\nlimits@AmS=\nolimits}
  334.  
  335. \LimitsOnNames
  336.  
  337. \def\operatorname#1{\mathop{\mathcode`'="7027 \mathcode`-="70
  338.        \rm #1}\nolimits}                                              % NOTE 31
  339.  
  340. \def\operatornamewithlimits#1{\mathop{\mathcode`'="7027 \mathcode`-="702D
  341.    \rm #1}\nlimits@AmS}
  342.  
  343. \def\operator#1{\mathop{#1}\nolimits}
  344. \def\operatorwithlimits#1{\mathop{#1}\displaylimits}
  345.  
  346. \def\limover{\mathop{\overline{\rm lim}}}
  347. \def\limunder{\mathop{\underline{\vrule height 0pt depth .2ex width 0pt
  348.        \rm lim}}}
  349. \def\liminj{\setbox0=\hbox{\rm lim}\mathop{\rm lim}
  350.         \limits_{\topsmash{\hbox to \wd0{\leftarrowfill}}}}
  351. \def\limproj{\setbox0=\hbox{\rm lim}\mathop{\rm lim}
  352.         \limits_{\topsmash{\hbox to \wd0{\rightarrowfill}}}}
  353.  
  354.  
  355. % SUBSIDIARY CONSIDERATIONS FOR LARGE OPERATORS -- BUFFER AND SHAVE
  356.  
  357. \newdimen\buffer@AmS
  358. \buffer@AmS=\fontdimen13\tenex                                        % NOTE 32
  359. \newdimen\buffer
  360. \buffer=\buffer@AmS
  361.  
  362. \def\changebuffer#1{\fontdimen13 \tenex=#1 \buffer=\fontdimen13 \tenex}
  363. \def\resetbuffer{\fontdimen13 \tenex=\buffer@AmS \buffer=\buffer@AmS}
  364.  
  365. \def\shave#1{\mathop{\hbox{$\fontdimen13\tenex=0pt                    % NOTE 33
  366.      \displaystyle{#1}$}}\fontdimen13\tenex=1\buffer}
  367.  
  368.  
  369. \def\topshave#1{\topsmash{#1}\vphantom{\shave{#1}}}
  370.  
  371. \def\botshave#1{\botsmash{#1}\vphantom{\shave{#1}}}
  372.  
  373.  
  374.  
  375. % ALIGNED UNITS
  376.  
  377. \def\Let@AmS{\relax@AmS\iffalse{\fi\let\\=\cr\iffalse}\fi}            % NOTE 34
  378.  
  379. \def\align{\def\vspace##1{\noalign{\vskip ##1}}                       % NOTE 35
  380.   \,\vcenter\bgroup\Let@AmS\tabskip=0pt\openup3pt\mathsurround=0pt  % NOTE 35.1
  381.   \halign\bgroup\strut
  382.   \hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil\cr}        % NOTES 36, 37
  383.  
  384. \def\endalign{\strut\crcr\egroup\egroup}
  385.  
  386.  
  387. \def\bunch{\def\vspace##1{\noalign{\vskip ##1}}
  388.   \,\vcenter\bgroup\Let@AmS\tabskip=0pt\openup3pt\mathsurround=0pt
  389.      \halign\bgroup\strut\hfil$\displaystyle{##}$\hfil\cr}
  390.  
  391. \def\endbunch{\strut\crcr\egroup\egroup}
  392.  
  393. \def\matrix{\catcode`\^^I=4 \futurelet\tok@AmS\matrix@AmS}            % NOTE 38
  394.  
  395. \def\matrix@AmS{\relax@AmS\iffalse{\fi \ifnum`}=0\fi\ifx\tok@AmS\format
  396.    \def\next@AmS{\expandafter\matrix@@AmS\eat@AmS}\else
  397.    \def\next@AmS{\matrix@@@AmS}\fi\next@AmS}
  398.  
  399. \def\matrix@@@AmS{
  400.  \ifnum`{=0\fi\iffalse}\fi\,\vcenter\bgroup\Let@AmS\tabskip=0pt
  401.     \normalbaselines\halign\bgroup $\strut\hfil##\hfil$&&\quad$\strut
  402.   \hfil##\hfil$\cr\strut\cr\noalign{\kern-\baselineskip}}             % NOTE 39
  403.  
  404. \def\matrix@@AmS#1\\{
  405.    \def\premable@AmS{#1}\toks@{##}
  406.  \def\c{$\copy\strutbox\hfil\the\toks@\hfil$}\def\r
  407.    {$\copy\strutbox\hfil\the\toks@$}%
  408.    \def\l{$\copy\strutbox\the\toks@\hfil$}%
  409. \setbox0=
  410. \hbox{\xdef\Preamble@AmS{\premable@AmS}}
  411.  \def\vspace##1{\noalign{\vskip ##1}}\ifnum`{=0\fi\iffalse}\fi
  412. \,\vcenter\bgroup\Let@AmS
  413.   \tabskip=0pt\normalbaselines\halign\bgroup\span\Preamble@AmS\cr
  414.     \mathstrut\cr\noalign{\kern-\baselineskip}}
  415.                                                                       % NOTE 40
  416.  
  417. \def\endmatrix{\crcr\mathstrut\cr\noalign{\kern-\baselineskip
  418.    }\egroup\egroup\,\catcode`\^^I=10 }
  419.  
  420.  
  421.  
  422. \def\matrixp{\left(\matrix}
  423. \def\endmatrixp{\endmatrix\right)}
  424.  
  425. \def\matrixb{\left[\matrix}
  426. \def\endmatrixb{\endmatrix\right]}
  427.  
  428. \def\matrixv{\left|\matrix}
  429. \def\endmatrixv{\endmatrix\right|}
  430.  
  431. \def\matrixvv{\left\|\matrix}
  432. \def\endmatrixvv{\endmatrix\right\|}
  433.  
  434.  
  435. \def\spacedots#1for#2{\multispan#2\leaders\hbox{$\mkern#1mu.\mkern
  436.     #1mu$}\hfill}
  437. \def\dotsfor#1{\spacedots 1.5 for #1}                                 % NOTE 41
  438.  
  439.  
  440. \def\enabletabs{\catcode`\^^I=4 \enabletabs@AmS}
  441. \def\enabletabs@AmS#1\disabletabs{#1\catcode`\^^I=10 }                % NOTE 42
  442.  
  443. \def\Enabletabs{\catcode`\^^I=4 }
  444. \def\Disabletabs{\catcode`\^^I=10 }
  445.  
  446.  
  447. \def\smallmatrix{\futurelet\tok@AmS\smallmatrix@AmS}                  % NOTE 43
  448.  
  449. \def\smallmatrix@AmS{\relax@AmS\iffalse{\fi \ifnum`}=0\fi\ifx\tok@AmS\format
  450.    \def\next@AmS{\expandafter\smallmatrix@@AmS\eat@AmS}\else
  451.    \def\next@AmS{\smallmatrix@@@AmS}\fi\next@AmS}
  452.  
  453. \def\smallmatrix@@@AmS{
  454.  \ifnum`{=0\fi\iffalse}\fi\,\vcenter\bgroup\Let@AmS\tabskip=0pt
  455.     \baselineskip8pt\lineskip1pt\lineskiplimit1pt
  456.   \halign\bgroup $\strut\hfil##\hfil$&&\;$\strut
  457.   \hfil##\hfil$\cr\strut\cr\noalign{\kern-\baselineskip}}
  458.  
  459. \def\smallmatrix@@AmS#1\\{
  460.    \def\premable@AmS{#1}\toks@{##}
  461.  \def\c{$\copy\strutbox\hfil\the\toks@\hfil$}\def\r
  462.    {$\copy\strutbox\hfil\the\toks@$}%
  463.    \def\l{$\copy\strutbox\the\toks@\hfil$}%
  464. \hbox{\xdef\Preamble@AmS{\premable@AmS}}
  465.  \def\vspace##1{\noalign{\vskip ##1}}\ifnum`{=0\fi\iffalse}\fi
  466. \,\vcenter\bgroup\Let@AmS
  467.      \tabskip=0pt\baselineskip8pt\lineskip1pt\lineskiplimit1pt
  468. \halign\bgroup\span\Preamble@AmS\cr
  469.     \mathstrut\cr\noalign{\kern-\baselineskip}}
  470.  
  471. \def\endsmallmatrix{\crcr\mathstrut\cr\noalign{\kern-\baselineskip}
  472.    \egroup\egroup\,}
  473.  
  474.  
  475. \def\cases{\left\{ \,\vcenter\bgroup\Let@AmS\normalbaselines\tabskip=0pt
  476.    \halign\bgroup$##\hfil$&\qquad$##\hfil$\cr}                        % NOTE 44
  477.  
  478. \def\endcases{\crcr\egroup\egroup\right.}
  479.  
  480.  
  481. % TAGGING
  482.  
  483. \def\TagsOnLeft{\def\tagposition@AmS{L}}
  484. \def\TagsOnRight{\def\tagposition@AmS{R}}
  485. \def\TagsAsMath{\def\tagstyle@AmS{M}}
  486. \def\TagsAsText{\def\tagstyle@AmS{T}}
  487.  
  488. \TagsOnLeft
  489. \TagsAsText
  490.  
  491. \def\tag#1$${\if L\tagposition@AmS
  492.     \leqno\else\eqno\fi\def\atag@AmS{T}\maketag@AmS#1\tagend@AmS$$}   % NOTE 45
  493.  
  494. \def\maketag@AmS{\futurelet\tok@AmS\maketag@@AmS}                     % NOTE 46
  495. \def\maketag@@AmS{\ifx\tok@AmS[\def\next@AmS{\maketag@@@AmS}\else
  496.       \def\next@AmS{\maketag@@@@AmS}\fi\next@AmS}
  497. \def\maketag@@@AmS[#1]#2\tagend@AmS{\if F\atag@AmS\else             % NOTE 46.1
  498.    \if M\tagstyle@AmS\hbox{$#1$}\else\hbox{#1}\fi\fi
  499.        \gdef\atag@AmS{F}}
  500. \def\maketag@@@@AmS#1\tagend@AmS{\if F\atag@AmS \else
  501.         \if T\autotag@AmS \setbox0=\hbox
  502.     {\if M\tagstyle@AmS\tagform@AmS{$#1$}\else\tagform@AmS{#1}\fi}
  503.                         \ifdim\wd0=0pt \tagform@AmS{*}\else
  504.             \if M\tagstyle@AmS\tagform@AmS{$#1$}\else\tagform@AmS{#1}\fi
  505.                      \fi\else
  506.                \if M\tagstyle@AmS\tagform@AmS{$#1$}\else\tagform@AmS{#1}\fi
  507.                      \fi
  508.                   \fi\gdef\atag@AmS{F}}
  509.  
  510. \def\tagform@AmS#1{\hbox{\rm(#1\unskip)}}
  511.  
  512. \def\AutoTag{\def\autotag@AmS{T}}
  513. \def\NoAutoTag{\def\autotag@AmS{F}}
  514.  
  515. \NoAutoTag
  516.  
  517.  
  518.  
  519.  
  520.  
  521. \def\inaligntag@AmS{F} \def\inbunchtag@AmS{F}                         % NOTE 47
  522.  
  523. \def\CenteredTagsOnBrokens{\def\centerbroken@AmS{T}}                  % NOTE 48
  524. \def\TopOrBottomTagsOnBrokens{\def\centerbroken@AmS{F}}
  525. \TopOrBottomTagsOnBrokens
  526.  
  527. \def\broken{\global\setbox0=\vbox\bgroup\Let@AmS\tabskip=0pt
  528.  \if T\inaligntag@AmS\else
  529.    \if T\inbunchtag@AmS\else\openup3pt\fi\fi\mathsurround=0pt
  530.      \halign\bgroup\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfill
  531.       \cr}
  532.                                                                       % NOTE 49
  533. \def\endbroken{\strut\crcr\egroup\egroup
  534.       \global\setbox7=\vbox{\unvbox0\setbox1=\lastbox
  535.       \hbox{\unhbox1\unskip\setbox2=\lastbox
  536.        \unskip\setbox3=\lastbox
  537.          \global\setbox4=\copy3
  538.           \box3\box2}}%                                               % NOTE 50
  539.   \if L\tagposition@AmS
  540.      \if T\inaligntag@AmS
  541.            \if T\centerbroken@AmS\gdef\broken@AmS
  542.                 {&\vcenter{\vbox{\moveleft\wd4\box7}}}%               % NOTE 51
  543.            \else
  544.             \gdef\broken@AmS{&\vbox{\moveleft\wd4\vtop{\unvbox7}}}%   % NOTE 52
  545.            \fi
  546.      \else                                                            % NOTE 53
  547.            \if T\centerbroken@AmS\gdef\broken@AmS
  548.                 {\vcenter{\box7}}%
  549.            \else
  550.               \gdef\broken@AmS{\vtop{\unvbox7}}%
  551.            \fi
  552.      \fi
  553.   \else                                                  % NOTE 55 (no note 54)
  554.       \if T\inaligntag@AmS
  555.            \if T\centerbroken@AmS
  556.               \gdef\broken@AmS{&\vcenter{\vbox{\moveleft\wd4\box7}}}%
  557.           \else
  558.              \gdef\broken@AmS{&\vbox{\moveleft\wd4\box7}}%
  559.           \fi
  560.       \else
  561.           \if T\centerbroken@AmS
  562.             \gdef\broken@AmS{\vcenter{\box7}}%
  563.           \else
  564.              \gdef\broken@AmS{\box7}%
  565.           \fi
  566.       \fi
  567.   \fi\broken@AmS}
  568.  
  569. \def\cbroken{\xdef\centerbroken@@AmS{\centerbroken@AmS}%
  570.                        \def\centerbroken@AmS{T}\broken}               % NOTE 56
  571. \def\endcbroken{\endbroken\def\centerbroken@AmS{\centerbroken@@AmS}}
  572.  
  573.  
  574. \def\multline#1${\in@AmS\tag{#1}\if T\cresult@AmS
  575.  \def\multline@AmS{\def\atag@AmS{T}\getmltag@AmS#1$}\else
  576.    \def\multline@AmS{\def\atag@AmS{F}\setbox9=\hbox{}\multline@@AmS
  577.     \multline@@@AmS#1$}\fi\multline@AmS}                              % NOTE 57
  578.  
  579. \def\getmltag@AmS#1\tag#2${\setbox9=\hbox{\maketag@AmS#2\tagend@AmS}%
  580.            \multline@@AmS\multline@@@AmS#1$}
  581.  
  582. \def\multline@@AmS{\if L\tagposition@AmS
  583.      \def\lwidth@AmS{\hskip\wd9}\def\rwidth@AmS{\hskip0pt}\else
  584.       \def\lwidth@AmS{\hskip0pt}\def\rwidth@AmS{\hskip\wd9}\fi}      % NOTE 58
  585.  
  586. \def\multline@@@AmS{\def\vspace##1{\noalign{\vskip ##1}}%
  587.  \def\shoveright##1{##1\hfilneg\rwidth@AmS\quad}                      % NOTE 59
  588.   \def\shoveleft##1{\setbox                                           % NOTE 60
  589.       0=\hbox{$\displaystyle{}##1$}%
  590.      \setbox1=\hbox{$\displaystyle##1$}%
  591.      \ifdim\wd0=\wd1
  592.     \hfilneg\lwidth@AmS\quad##1\else
  593.       \setbox2=\hbox{\hskip\wd0\hskip-\wd1}%
  594.        \hfilneg\lwidth@AmS\quad\hskip-.5\wd2 ##1\fi}
  595.      \vbox\bgroup\Let@AmS\openup3pt\halign\bgroup\hbox to \the\displaywidth
  596.       {$\displaystyle\hfil{}##\hfil$}\cr\hfilneg\quad
  597.       \if L\tagposition@AmS\hskip-1em\copy9\quad\else\fi}             % NOTE 61
  598.  
  599.  
  600. \def\endmultline{\if R\tagposition@AmS\quad\box9                 % NOTES 62, 63
  601.    \hskip-1em\else\fi\quad\hfilneg\crcr\egroup\egroup}
  602.  
  603.  
  604.  
  605. \def\aligntag#1$${\def\inaligntag@AmS{T}\openup3pt\mathsurround=0pt   % NOTE 64
  606.  \Let@AmS
  607.    \def\tag{\gdef\atag@AmS{T}&}                                       % NOTE 65
  608.    \def\vspace##1{\noalign{\vskip##1}}                                % NOTE 66
  609.     \def\xtext##1{\noalign{\hbox{##1}}}                               % NOTE 67
  610.    \def\break{\noalign{\penalty-10000 }}                              % NOTE 68
  611.    \def\nobreak{\noalign{\penalty 10000 }}
  612.    \def\allowbreak{\noalign{\penalty 0 }}
  613.    \def\goodbreak{\noalign{\penalty -500 }}
  614.     \gdef\atag@AmS{F}%
  615. \if L\tagposition@AmS\laligntag@AmS#1$$\else
  616.    \raligntag@AmS#1$$\fi}
  617.  
  618. \def\raligntag@AmS#1$${\tabskip\centering
  619.    \halign to \the\displaywidth
  620. {\hfil$\displaystyle{##}$\tabskip 0pt
  621.     &$\displaystyle{{}##}$\hfil\tabskip\centering
  622.    &\llap{\maketag@AmS##\tagend@AmS}\tabskip 0pt\cr\noalign{\vskip-
  623.      \lineskiplimit}#1\crcr}$$}
  624.  
  625. \def\laligntag@AmS#1$${\tabskip\centering                             % NOTE 69
  626.    \halign to \the\displaywidth
  627. {\hfil$\displaystyle{##}$\tabskip0pt
  628.    &$\displaystyle{{}##}$\hfil\tabskip\centering
  629.     &\kern-\displaywidth\rlap{\maketag@AmS##\tagend@AmS}\tabskip
  630.     \the\displaywidth\cr\noalign{\vskip-\lineskiplimit}#1\crcr}$$}
  631.  
  632. \def\endaligntag{}
  633.  
  634. \def\bunchtag#1$${\def\inbunchtag@AmS{T}\openup3pt\mathsurround=0pt   % NOTE 70
  635.     \Let@AmS
  636.    \def\tag{\gdef\atag@AmS{T}&}
  637.    \def\vspace##1{\noalign{\vskip##1}}
  638.    \def\xtext##1{\noalign{\hbox{##1}}}
  639.    \def\break{\noalign{\penalty-10000 }}
  640.    \def\nobreak{\noalign{\penalty 10000 }}
  641.    \def\allowbreak{\noalign{\penalty 0 }}
  642.     \def\goodbreak{\noalign{\penalty -500 }}
  643.   \if L\tagposition@AmS\lbunchtag@AmS#1$$\else
  644.     \rbunchtag@AmS#1$$\fi}
  645.  
  646. \def\rbunchtag@AmS#1$${\tabskip\centering
  647.     \halign to \displaywidth {$\hfil\displaystyle{##}\hfil$&
  648.       \llap{\maketag@AmS##\tagend@AmS}\tabskip 0pt\cr\noalign{\vskip-
  649.        \lineskiplimit}#1\crcr}$$}
  650.  
  651. \def\lbunchtag@AmS#1$${\tabskip\centering
  652.    \halign to \displaywidth
  653. {$\hfil\displaystyle{##}\hfil$&\kern-
  654.     \displaywidth\rlap{\maketag@AmS##\tagend@AmS}\tabskip\the\displaywidth\cr
  655.     \noalign{\vskip-\lineskiplimit}#1\crcr}$$}
  656.  
  657. \def\endbunchtag{}
  658.  
  659.  
  660. %  MISCELLANEOUS
  661.  
  662. \def\hyphen{\mathchar"702D}                                           % NOTE 71
  663. \def\endash{\mathchar"707B}
  664. \def\emdash{\mathchar"707C}
  665. \def\rightquote{\mathchar"7027}
  666. \def\rightquoteii{\mathchar"7022}
  667. \def\leftquote{\mathchar"7060}
  668. \def\leftquoteii{\mathchar"705C}
  669.  
  670. \def\mod#1{\allowbreak\mkern18mu{\rm mod}\,\,#1}
  671.  
  672. % CONTINUED FRACTIONS
  673.  
  674. \def\numeratorleft#1{#1\hskip 0pt plus 1filll\relax@AmS}
  675. \def\numeratorright#1{\hskip 0pt plus 1filll\relax@AmS#1}
  676. \def\numeratorcenter#1{\hskip 0pt plus 1filll\relax@AmS
  677.       #1\hskip 0pt plus 1filll\relax@AmS}
  678.  
  679. \def\cfrac@AmS#1,{\def\numerator@AmS{#1}\cfrac@@AmS*}                 % NOTE 72
  680.  
  681. \def\cfrac@@AmS#1;#2#3\cfend@AmS{\comp@AmS\cfmark@AmS{#2}\if T\cresult@AmS
  682.  \gdef\cfrac@@@AmS
  683.   {\expandafter\eat@AmS\numerator@AmS\strut\over\eat@AmS#1}\else
  684.   \comp@AmS;{#2}\if T\cresult@AmS\gdef\cfrac@@@AmS
  685.   {\expandafter\eat@AmS\numerator@AmS\strut\over\eat@AmS#1}\else
  686. \gdef\cfrac@@@AmS{\if R\cftype@AmS\hfill\else\fi
  687.     \expandafter\eat@AmS\numerator@AmS\strut
  688.     \if L\cftype@AmS\hfill\else\fi\over
  689.        \eat@AmS#1\displaystyle {\cfrac@AmS*#2#3\cfend@AmS}}
  690.      \fi\fi\cfrac@@@AmS}
  691.  
  692. \def\cfrac#1{\def\cftype@AmS{C}\cfrac@AmS*#1;\cfmark@AmS\cfend@AmS}
  693.  
  694. \def\cfracl#1{\def\cftype@AmS{L}\cfrac@AmS*#1;\cfmark@AmS\cfend@AmS}
  695.  
  696. \def\cfracr#1{\def\cftype@AmS{R}\cfrac@AmS*#1;\cfmark@AmS\cfend@AmS}
  697.  
  698. \def\adorn#1#2#3{\mathsurround=0pt\setbox0=\hbox{$\displaystyle{#2}#3$}%
  699.    \setbox1=\hbox{$\displaystyle\vphantom{#2}#1{#2}$}%
  700.     \setbox2=\hbox{\hskip\wd0\hskip-\wd1}%
  701.     \hskip-\wd2\mathop{\hskip\wd2\vphantom{#2}#1{#2}#3}}
  702.  
  703. %  ARROWS                                                             % NOTE 73
  704.  
  705. \def\overrightarrow{\mathpalette\overrightarrow@AmS}
  706.  
  707. \def\overrightarrow@AmS#1#2{\vbox{\halign{$##$\cr
  708.     #1{-}\mkern-6mu\cleaders\hbox{$#1\mkern-2mu{-}\mkern-2mu$}\hfill
  709.      \mkern-6mu{\to}\cr
  710.      \noalign{\kern -1pt\nointerlineskip}
  711.      \hfil#1#2\hfil\cr}}}
  712.  
  713. \let\overarrow=\overrightarrow
  714.  
  715. \def\overleftarrow{\mathpalette\overleftarrow@Ams}
  716.  
  717. \def\overleftarrow@Ams#1#2{\vbox{\halign{$##$\cr
  718.      #1{\leftarrow}\mkern-6mu\cleaders\hbox{$#1\mkern-2mu{-}\mkern-2mu$}\hfill
  719.       \mkern-6mu{-}\cr
  720.      \noalign{\kern -1pt\nointerlineskip}
  721.      \hfil#1#2\hfil\cr}}}
  722.  
  723. \def\overleftrightarrow{\mathpalette\overleftrightarrow@AmS}
  724.  
  725. \def\overleftrightarrow@AmS#1#2{\vbox{\halign{$##$\cr
  726.      #1{\leftarrow}\mkern-6mu\cleaders\hbox{$#1\mkern-2mu{-}\mkern-2mu$}\hfill
  727.        \mkern-6mu{\to}\cr
  728.     \noalign{\kern -1pt\nointerlineskip}
  729.       \hfil#1#2\hfil\cr}}}
  730.  
  731. \def\underrightarrow{\mathpalette\underrightarrow@AmS}
  732.  
  733. \def\underrightarrow@AmS#1#2{\vtop{\halign{$##$\cr
  734.     \hfil#1#2\hfil\cr
  735.      \noalign{\kern -1pt\nointerlineskip}
  736.     #1{-}\mkern-6mu\cleaders\hbox{$#1\mkern-2mu{-}\mkern-2mu$}\hfill
  737.      \mkern-6mu{\to}\cr}}}
  738.  
  739. \let\underarrow=\underrightarrow
  740.  
  741. \def\underleftarrow{\mathpalette\underleftarrow@AmS}
  742.  
  743. \def\underleftarrow@AmS#1#2{\vtop{\halign{$##$\cr
  744.      \hfil#1#2\hfil\cr
  745.      \noalign{\kern -1pt\nointerlineskip}
  746.      #1{\leftarrow}\mkern-6mu\cleaders\hbox{$#1\mkern-2mu{-}\mkern-2mu$}\hfill
  747.       \mkern-6mu{-}\cr}}}
  748.  
  749. \def\underleftrightarrow{\mathpalette\underleftrightarrow@AmS}
  750.  
  751. \def\underleftrightarrow@AmS#1#2{\vtop{\halign{$##$\cr
  752.       \hfil#1#2\hfil\cr
  753.     \noalign{\kern -1pt\nointerlineskip}
  754.      #1{\leftarrow}\mkern-6mu\cleaders\hbox{$#1\mkern-2mu{-}\mkern-2mu$}\hfill
  755.        \mkern-6mu{\to}\cr}}}
  756.  
  757. % DOTS
  758.  
  759. \def\dotsc{\mathinner{\ldotp\ldotp\ldotp}}
  760. \def\dotsi{\mathinner{\cdotp\cdotp\cdotp}}
  761. \def\dotsj{\mathinner{\ldotp\ldotp\ldotp}}
  762. \def\dotsb{\mathinner{\cdotp\cdotp\cdotp}}
  763.  
  764. \def\binary@AmS#1{{\thinmuskip 0mu \medmuskip 1mu \thickmuskip 1mu    % NOTE 74
  765.       \setbox0=\hbox{$#1{}{}{}{}{}{}{}{}{}$}\setbox1=\hbox
  766.        {${}#1{}{}{}{}{}{}{}{}{}$}\ifdim\wd1>\wd0\gdef\binary@@AmS{T}\else
  767.        \gdef\binary@@AmS{F}\fi}}
  768.  
  769. \def\dots{\relax@AmS\ifmmode\def\dots@AmS{\mdots@AmS}\else
  770.     \def\dots@AmS{\tdots@AmS}\fi\dots@AmS}
  771.  
  772. \def\mdots@AmS{\futurelet\tok@AmS\mdots@@AmS}
  773.  
  774. \def\mdots@@AmS{\def\thedots@AmS{\dotsj}%
  775.   \ifx\tok@AmS\bgroup\else
  776.   \ifx\tok@AmS\egroup\else
  777.   \ifx\tok@AmS$\else
  778.   \iffalse{\fi  \ifx\tok@AmS\\ \iffalse}\fi\else                      % NOTE 75
  779.   \iffalse{\fi \ifx\tok@AmS&  \iffalse}\fi\else
  780.   \ifx\tok@AmS\left\else
  781.   \ifx\tok@AmS\right\else
  782.   \ifx\tok@AmS,\def\thedots@AmS{\dotsc}\else
  783.   \inttest@AmS\tok@AmS\if T\intflag@AmS\def\thedots@AmS{\dotsi}\else
  784.   \binary@AmS\tok@AmS\if T\binary@@AmS\def\thedots@AmS{\dotsb}\else
  785.    \def\thedots@AmS{\dotsj}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\thedots@AmS}
  786.  
  787. \def\tdots@AmS{\unskip\ \tdots@@AmS}
  788.  
  789. \def\tdots@@AmS{\futurelet\tok@AmS\tdots@@@AmS}
  790.  
  791. \def\tdots@@@AmS{$\ldots\,
  792.    \ifx\tok@AmS,$\else
  793.    \ifx\tok@AmS.\,$\else
  794.    \ifx\tok@AmS;\,$\else
  795.    \ifx\tok@AmS:\,$\else
  796.    \ifx\tok@AmS?\,$\else
  797.    \ifx\tok@AmS!\,$\else
  798.    $\ \fi\fi\fi\fi\fi\fi}
  799.  
  800.  
  801. % SET NOTATION
  802.  
  803. \def\lset{\{\,}
  804. \def\rset{\,\}}
  805.  
  806.  
  807. \def\leftset#1\mid#2\rightset{\hbox{$\displaystyle
  808. \left\{\,#1\vphantom{#1#2}\;\right|\;\left.
  809.     #2\vphantom{#1#2}\,\right\}\offspace@AmS$}}
  810.  
  811.  
  812. % ACCENT SYMBOLS
  813.  
  814. \def\dotii#1{{\mathop{#1}\limits^{\vbox to -1.4pt{\kern-2pt
  815.    \hbox{\tenrm..}\vss}}}}
  816. \def\dotiii#1{{\mathop{#1}\limits^{\vbox to -1.4pt{\kern-2pt
  817.    \hbox{\tenrm...}\vss}}}}
  818. \def\dotiv#1{{\mathop{#1}\limits^{\vbox to -1.4pt{\kern-2pt
  819.    \hbox{\tenrm....}\vss}}}}
  820.  
  821. \def\vecsymbol{\rightarrow}
  822. \def\barsymbol{-}
  823. \def\tildesymbol{\mathchar"0218 }
  824. \def\hatsymbol{{\mathchoice{\null}{\null}{\,\,\hbox{\lower 10pt\hbox
  825.     {$\widehat{\null}$}}}{\,\hbox{\lower 20pt\hbox
  826.        {$\hat{\null}$}}}}}
  827. \def\dotsymbol{{\nonscript\,.}}
  828. \def\dotiisymbol{{\nonscript\,\hbox{\tenrm..}}}
  829. \def\dotiiisymbol{{\nonscript\,\hbox{\tenrm...}}}
  830. \def\dotivsymbol{{\nonscript\,\hbox{\tenrm....}}}
  831. \def\dotsymbol{{\nonscript\,\hbox{\tenrm.}}}
  832.  
  833.  
  834.  
  835. % OVERSET AND OVERBRACE
  836.  
  837. \def\overset#1\to#2{{\mathop{#2}^{#1}}}
  838.  
  839. \def\underset#1\to#2{{\mathop{#2}_{#1}}}
  840.  
  841. \def\oversetbrace#1\to#2{{\overbrace{#2}^{#1}}}
  842. \def\undersetbrace#1\to#2{{\underbrace{#2}_{#1}}}
  843.  
  844.  
  845. % ROOTS
  846.  
  847. \def\uproot#1{\gdef\theuproot{#1 pt}}
  848. \def\theuproot{0 pt}
  849.  
  850. \def\therightroot{0mu}
  851. \def\rightroot#1{\gdef\therightroot{-#1mu}}
  852.  
  853.  
  854. \def\r@@t#1#2{\setbox\z@\hbox{$\m@th#1\sqrt{#2}$}%
  855.   \dimen@\ht\z@ \advance\dimen@-\dp\z@ \advance\dimen@\theuproot
  856.   \mskip5mu\raise.6\dimen@\copy\rootbox \mskip-10mu \mskip\therightroot
  857.     \box\z@\gdef\theuproot{0 pt}\gdef\therightroot{0mu}}              % NOTE 76
  858.  
  859.  
  860. %  BOXED
  861.  
  862.  
  863. \def\boxed#1{\setbox0=\hbox{$\displaystyle{#1}$}\hbox{\lower.4pt\hbox{\lower
  864.    3pt\hbox{\lower 1\dp0\hbox{\vbox{\hrule height .4pt \hbox{\vrule width
  865.    .4pt \hskip 3pt\vbox{\vskip 3pt\box0\vskip3pt}\hskip 3pt \vrule width
  866.       .4pt}\hrule height .4pt}}}}}}
  867.  
  868. %  FORMATTING MACROS COMMON TO ALL STYLES
  869.  
  870. \def\documentstyle#1{\input #1.sty}
  871.  
  872. \newif\ifretry@AmS
  873. \def\y@AmS{y } \def\y@@AmS{Y } \def\n@AmS{n } \def\n@@AmS{N }
  874. \def\ask@AmS{\message
  875.   {Do you want output? (y or n, follow answer by return) }\loop
  876.    \read-1 to\answer@AmS
  877.   \ifx\answer@AmS\y@AmS\retry@AmSfalse\outputon
  878.    \else\ifx\answer@AmS\y@@AmS\retry@AmSfalse\outputon
  879.     \else\ifx\answer@AmS\n@AmS\retry@AmSfalse\outputoff
  880.      \else\ifx\answer@AmS\n@@AmS\retry@AmSfalse\outputoff
  881.       \else \retry@AmStrue\fi\fi\fi\fi
  882.   \ifretry@AmS\message{Type y or n, follow answer by return: }\repeat}
  883.  
  884. \def\outputoff{\global\output{\setbox0=\box255 \deadcycles=0}}
  885.  
  886. \def\outputon{\global\output{\output@AmS}}
  887. \outputon
  888.  
  889. \catcode`\@=13
  890.